@import '../../variables.scss';

.hzdz-city-security {
  position: relative;
  width: 173px;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #0a0e13;
  // 响应式适配
  @media screen and (max-width: 1920px) {
    transform: scale(0.8);
    transform-origin: top left;
    gap: 14px;
  }

  @media screen and (max-width: 1080px) {
    transform: scale(0.6);
    transform-origin: top left;
    gap: 11px;
  }

  @media screen and (min-width: 3952px) {
    transform: scale(1.2);
    transform-origin: top left;
    gap: 22px;
  }

  // 单个安保项目
  &__item {
    position: relative;
    width: 173px;
    height: 56px;
    border-radius: 0 28px 28px 0;
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 0 12px 0 64px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    // 使用伪元素实现渐变边框效果
    &::before {
      //content: '';
      //position: absolute;
      //top: 0;
      //left: 0;
      //right: 0;
      //bottom: 0;
      //border-radius: 100px 0px 0px 100px;
      //padding: 1px;
      //background: var(--border-gradient);
      //-webkit-mask:
      //  linear-gradient(#fff 0 0) content-box,
      //  linear-gradient(#fff 0 0);
      //-webkit-mask-composite: subtract;
      //mask:
      //  linear-gradient(#fff 0 0) content-box,
      //  linear-gradient(#fff 0 0);
      //mask-composite: subtract;
      //pointer-events: none;
    }

    &:hover {
      transform: translateX(-5px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
  }

  &__text {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 400;
    font-size: 20px;
    color: #FFFFFF;
    line-height: 29px;
    letter-spacing: 2px;
    text-align: left;
    font-style: normal;
    white-space: nowrap;
    z-index: 2;
    position: relative;
  }

  &__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  // 响应式调整
  @media screen and (max-width: 1920px) {
    width: 138px;

    &__item {
      width: 138px;
      height: 45px;
      padding: 0 10px 0 51px;
    }

    &__text {
      font-size: 16px;
      line-height: 23px;
      letter-spacing: 1.6px;
    }

    &__icon {
      width: 26px;
      height: 26px;
    }
  }

  @media screen and (max-width: 1080px) {
    width: 104px;

    &__item {
      width: 104px;
      height: 34px;
      padding: 0 7px 0 38px;
    }

    &__text {
      font-size: 12px;
      line-height: 17px;
      letter-spacing: 1.2px;
    }

    &__icon {
      width: 19px;
      height: 19px;
    }
  }

  @media screen and (min-width: 3952px) {
    width: 208px;

    &__item {
      width: 208px;
      height: 67px;
      padding: 0 14px 0 77px;
    }

    &__text {
      font-size: 24px;
      line-height: 35px;
      letter-spacing: 2.4px;
    }

    &__icon {
      width: 38px;
      height: 38px;
    }
  }

  // 特定项目的渐变样式
  &__item:nth-child(1) {
    --border-gradient: linear-gradient(270deg, rgba(0, 139, 255, 0), rgba(230, 244, 255, 1));
  }

  &__item:nth-child(2) {
    --border-gradient: linear-gradient(270deg, rgba(255, 131, 0, 0), rgba(255, 255, 255, 1));
  }

  &__item:nth-child(3) {
    --border-gradient: linear-gradient(270deg, rgba(0, 139, 255, 0), rgba(230, 244, 255, 1));
  }

  &__item:nth-child(4) {
    --border-gradient: linear-gradient(270deg, rgba(255, 240, 202, 0), rgba(230, 244, 255, 1));
  }
}
